<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>

<html>
<head> 
	<title>Videshop Online</title> 
	<link href="../css/style.css" rel="stylesheet" type="text/css">
</head>
<body>
	<f:view>
		<table border="0" cellpadding="0" cellspacing="10">
			<tr>
				<td colspan="2"><h1>Videoshop Online</h1></td>
			</tr>
			<tr>
				<td valign="top">
					<table border="0" cellpadding="0" cellspacing="0">
						<tr>
							<td>
								<!-- User section -->
								<f:subview id="userSection">
									<jsp:include page="user.jsp"/>
								</f:subview>
							</td>
						</tr>
						<tr>
							<td>
								<!-- Category section -->
								<f:subview id="categorySection">
									<jsp:include page="category.jsp"/>
								</f:subview>
							</td>
						</tr>
						<tr>
							<td>
								<!-- Quick search section -->
								<f:subview id="quickSearchSection">
									<jsp:include page="quicksearch.jsp"/>
								</f:subview>
							</td>
						</tr>
					</table>
				</td>
				<td valign="top" class="mainSection">
					<h2>${titleSection.selectedTitle.titleName} (${titleSection.selectedTitle.year})</h2>
					<span class="infoMessage">You have chosen to reserve ${reservationSection.selectedTitle.titleName} in  ${reservationSection.selectedMedium.mediumType.description} format
					<br/>
					<span class="infoMessage">Please select a store and click Finish to finish your reservation</span>
					<h:form>
						<h:panelGrid columns="7">
							<span class="label">Store</span>
							<h:selectOneListbox	styleClass="select200" size="1" value="#{reservationSection.selectedStoreId}">
								<f:selectItems value="#{reservationSection.availableStores}"/>
							</h:selectOneListbox>
							<span class="label">Expiry Date</span>
							<h:selectOneListbox styleClass="select50" size="1" value="#{reservationSection.selectedExpiryDateDay}">
								<f:selectItems value="#{dateComponent.days}"/>
							</h:selectOneListbox>
							<h:selectOneListbox styleClass="select100" size="1" value="#{reservationSection.selectedExpiryDateMonth}">
								<f:selectItems value="#{dateComponent.months}"/>
							</h:selectOneListbox>
							<h:selectOneListbox styleClass="select100" size="1" value="#{reservationSection.selectedExpiryDateYear}">
								<f:selectItems value="#{dateComponent.years}"/>
							</h:selectOneListbox>
							<h:commandLink styleClass="button" action="#{reservationSection.finishReservation}">
								<f:verbatim>Finish</f:verbatim>
							</h:commandLink>
						</h:panelGrid>
					</h:form>
				</td>
			</tr>
		</table>
	</f:view>
</html>